package com.itheima.exerciseTest.method01_09.method7;

/*
    b.定义学生类Student，要求：
	  1)继承Person类，重写sleep方法，方法内打印输出“年龄为xxx的xx学生正在教室睡午觉”
		PS:xxx为变量age的值，xx为变量name的值
 */
public class Student extends Person {
    public Student() {
    }

    public Student(String name, int age) {
        super(name, age);
    }

    @Override
    public void sleep() {
        System.out.println("年龄为" + getAge() + "的" + getName() + "学生正在教室睡午觉");
    }
}
